package com.neu.flashmall.ms.mapper;

import com.neu.flashmall.ms.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
* @author 12615
* @description 针对表【sys_user】的数据库操作Mapper
* @createDate 2022-06-28 17:47:49
* @Entity com.neu.flashmallms.entity.SysUser
*/
@Mapper
public interface SysUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    long login(String username,String password);

    SysUser selectByUserName(String username);

    SysUser selectByPhone(String phone);

    List<SysUser> selectAll();

    int updateStatusByUsername(@Param("username") String username,@Param("status") Integer status);

    int setOneRoleUserToDefault(Integer role);

}
